Skip to content

feat: create fetch_celldex_ref() and label significant genes in make_volcano_plot() - #21

Merged
kelly-sovacool merged 27 commits into
mainfrom
nathan
Dec 5, 2025
Merged

feat: create fetch_celldex_ref() and label significant genes in make_volcano_plot()#21
kelly-sovacool merged 27 commits into
mainfrom
nathan

Conversation

@wong-nw

@wong-nw wong-nw commented Nov 14, 2025

Copy link
Copy Markdown
Collaborator

Changes

  • Updates to volcano plot to identify number of significant genes or list of genes to label on plot
  • Includes updated function fetch_celldex_ref to create local cache in working directory to retrieve celldex references for celltype annotation
  • Updates singleR function calls to use fetch_celldex_ref
  • Includes unit tests for run_singleR.R and run_singleR_cluster
    • Includes helper function for retrieving pbmc dataset from SeuratData for testing

Issues

PR Checklist

(Strikethrough any points that are not applicable.)

  • This comment contains a description of changes with justifications, with any relevant issues linked.
  • Write unit tests for any new features, bug fixes, or other code changes.
  • Update the docs if there are any API changes (roxygen2 comments, vignettes, readme, etc.).
  • Update NEWS.md with a short description of any user-facing changes and reference the PR number. Follow the style described in https://style.tidyverse.org/news.html
  • Run devtools::check() locally and fix all notes, warnings, and errors.

@github-actions github-actions Bot added the SCOT RepoName label Nov 14, 2025

@kelly-sovacool kelly-sovacool left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comments for problems that will need to be addressed.

Please run devtools::check() after you've made the changes and ensure there are no errors or warnings.

Comment thread DESCRIPTION
Comment thread DESCRIPTION Outdated
Comment thread R/fetch_celldex_ref.R Outdated
Comment thread R/make_bubble_plot.R Outdated
Comment thread R/make_bubble_plot.R Outdated
Comment thread R/run_singleR_db.R Outdated
Comment thread R/run_singleR_db.R
Comment thread R/make_volcano_plot.R Outdated
Comment thread R/make_volcano_plot.R Outdated
Comment thread tests/testthat/helper.R Outdated
Comment thread R/fetch_celldex_ref.R Outdated
wong-nw and others added 6 commits November 18, 2025 11:13
Co-authored-by: Kelly Sovacool, PhD <kelly-sovacool@users.noreply.github.com>
Using `package::function()` format
Co-authored-by: Kelly Sovacool, PhD <kelly-sovacool@users.noreply.github.com>
@kelly-sovacool kelly-sovacool changed the title PR: Code updates feat: create fetch_celldex_ref() and label significant genes in make_volcano_plot() Nov 18, 2025
kelly-sovacool

This comment was marked as resolved.

@wong-nw

This comment was marked as outdated.

@kelly-sovacool

This comment was marked as outdated.

@kelly-sovacool

This comment was marked as outdated.

@kelly-sovacool

This comment was marked as outdated.

* fix: package function calling

* Update helper function

* ci: 🤖 auto-format

---------

Co-authored-by: Kelly Sovacool, PhD <kelly-sovacool@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@kelly-sovacool kelly-sovacool added this to the 2025-12 milestone Dec 1, 2025
@kelly-sovacool kelly-sovacool self-assigned this Dec 1, 2025
@kelly-sovacool

This comment was marked as outdated.

@kelly-sovacool kelly-sovacool modified the milestones: 2025-12, 2025-11 Dec 2, 2025
Corrects issue with `Idents` function
@wong-nw

This comment was marked as resolved.

@kelly-sovacool

Copy link
Copy Markdown
Member

new test failures

══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-run_singleR_cluster.R:24:3'): cluster_cell_annot_type_count ──
Expected `length(which(singleR_cluster == "B_cell"))` to equal 345.
Differences:
  `actual`: 347.0
`expected`: 345.0

── Failure ('test-run_singleR_cluster.R:25:3'): cluster_cell_annot_type_count ──
Expected `length(which(singleR_cluster == "Monocyte"))` to equal 672.
Differences:
  `actual`: 671.0
`expected`: 672.0

── Failure ('test-run_singleR_cluster.R:26:3'): cluster_cell_annot_type_count ──
Expected `length(which(singleR_cluster == "NK_cell"))` to equal 157.
Differences:
  `actual`: 155.0
`expected`: 157.0

── Failure ('test-run_singleR_cluster.R:27:3'): cluster_cell_annot_type_count ──
Expected `length(which(singleR_cluster == "T_cells"))` to equal 1452.
Differences:
  `actual`: 1453.0
`expected`: 1452.0


[ FAIL 4 | WARN 697 | SKIP 0 | PASS 61 ]
Error:
! Test failures.
Execution halted

1 error ✖ | 1 warning ✖ | 1 note ✖

@wong-nw can you try running check() locally and make sure everything is addressed?

@kelly-sovacool

kelly-sovacool commented Dec 5, 2025

Copy link
Copy Markdown
Member

@wong-nw did devtools::check() pass locally in a fresh R session? it's still failing via github actions.

── R CMD check results ──────────────────────────────────── SCOT 0.0.0.9000 ────
Duration: 14m 48s

❯ checking dependencies in R code ... WARNING
  Namespaces in Imports field not imported from:
    ‘harmony’ ‘rliger’ ‘stats’
    All declared Imports should be used.
  Missing or unexported object: ‘SeuratData::DefaultAssay<-’

❯ checking R code for possible problems ... NOTE
  cluster_metrics: no visible global function definition for ‘dist’
    (/home/runner/work/SCOT/SCOT/check/SCOT.Rcheck/00_pkg_src/SCOT/R/cluster_metrics.R:42)
  run_batch_correction: no visible binding for global variable
    ‘scVIIntegration’
    (/home/runner/work/SCOT/SCOT/check/SCOT.Rcheck/00_pkg_src/SCOT/R/run_batch_correction.R:71-77)
  run_hypergeometric_test: no visible global function definition for
    ‘phyper’
    (/home/runner/work/SCOT/SCOT/check/SCOT.Rcheck/00_pkg_src/SCOT/R/run_hypergeometric_test.R:35-41)
  Undefined global functions or variables:
    dist phyper scVIIntegration
  Consider adding
    importFrom("stats", "dist", "phyper")
  to your NAMESPACE file.

Error: Error: R CMD check found WARNINGs
Execution halted
0 errors ✔ | 1 warning ✖ | 1 note ✖
  • Looks like there are still functions that need to be called with package::function() syntax:
    • stats::dist()
    • stats::phyper()
    • scVIIntegration -- is that from harmony or rliger?
  • If any packages in imports are not actually used, they need to be removed.

Please make these fixes, restart your R session, then run devtools::check() to ensure there are no errors or warnings.

@kelly-sovacool kelly-sovacool left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kelly-sovacool
kelly-sovacool merged commit 5f2ecaf into main Dec 5, 2025
2 checks passed
@kelly-sovacool
kelly-sovacool deleted the nathan branch December 5, 2025 23:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SCOT RepoName

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants